home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / gfx / 3d / irit50src.lha / irit5 / irit / freeform.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-15  |  9.6 KB  |  239 lines

  1. /*****************************************************************************
  2. *   "Irit" - the 3d (not only polygonal) solid modeller.             *
  3. *                                         *
  4. * Written by:  Gershon Elber                Ver 0.2, Mar. 1990   *
  5. ******************************************************************************
  6. *   Module to provide the required interfact for the cagd library for the    *
  7. * free form surfaces and curves.                         *
  8. *****************************************************************************/
  9.  
  10. #ifndef FREEFORM_H
  11. #define FREEFORM_H
  12.  
  13. CagdRType *GetKnotVector(IPObjectStruct *KntObjList,
  14.              int Order,
  15.              int *Length,
  16.              char **ErrStr);
  17. int GetDrawCtlPt(void);
  18. int GetFourPerFlat(void);
  19. int GetPolyApproxOptimal(void);
  20. int GetPolyApproxUV(void);
  21. RealType GetPolyApproxTol(void);
  22. IPObjectStruct *GenBezierSurfaceObject(IPObjectStruct *LstObjList);
  23. IPObjectStruct *GenBezierCurveObject(IPObjectStruct *PtObjList);
  24. IPObjectStruct *GenBsplineSurfaceObject(RealType *UOrder,
  25.                     RealType *VOrder,
  26.                     IPObjectStruct *LstObjList,
  27.                     IPObjectStruct *KntObjList);
  28. IPObjectStruct *GenBsplineCurveObject(RealType *ROrder,
  29.                       IPObjectStruct *PtObjList,
  30.                       IPObjectStruct *KntObjList);
  31. IPObjectStruct *GenSURFPREVObject(IPObjectStruct *Cross);
  32. IPObjectStruct *DivideSurfaceObject(IPObjectStruct *SrfObj,
  33.                     RealType *Dir,
  34.                     RealType *ParamVal);
  35. IPObjectStruct *RegionFromSurfaceObject(IPObjectStruct *SrfObj,
  36.                     RealType *RDir,
  37.                     RealType *ParamVal1,
  38.                     RealType *ParamVal2);
  39. IPObjectStruct *DivideCurveObject(IPObjectStruct *CrvObj, RealType *ParamVal);
  40. IPObjectStruct *RegionFromCurveObject(IPObjectStruct *CrvObj,
  41.                       RealType *ParamVal1,
  42.                       RealType *ParamVal2);
  43. IPObjectStruct *RefineSurfaceObject(IPObjectStruct *SrfObj,
  44.                     RealType *Dir,
  45.                     RealType *Replace,
  46.                     IPObjectStruct *KnotsObj);
  47. IPObjectStruct *RefineCurveObject(IPObjectStruct *CrvObj,
  48.                   RealType *Replace,
  49.                   IPObjectStruct *KnotsObj);
  50. IPObjectStruct *EvalSurfaceObject(IPObjectStruct *SrfObj,
  51.                   RealType *u,
  52.                   RealType *v);
  53. IPObjectStruct *EvalCurveObject(IPObjectStruct *CrvObj, RealType *t);
  54. IPObjectStruct *DeriveSurfaceObject(IPObjectStruct *SrfObj, RealType *Dir);
  55. IPObjectStruct *DeriveCurveObject(IPObjectStruct *CrvObj);
  56. IPObjectStruct *IntegrateCurveObject(IPObjectStruct *CrvObj);
  57. IPObjectStruct *SurfaceNormalObject(IPObjectStruct *SrfObj);
  58. IPObjectStruct *NormalSurfaceObject(IPObjectStruct *SrfObj,
  59.                     RealType *u,
  60.                     RealType *v);
  61. IPObjectStruct *TangentSurfaceObject(IPObjectStruct *SrfObj,
  62.                      RealType *Dir,
  63.                      RealType *u,
  64.                      RealType *v);
  65. IPObjectStruct *TangentCurveObject(IPObjectStruct *CrvObj, RealType *t);
  66. IPObjectStruct *CurveFromSrfMesh(IPObjectStruct *SrfObj,
  67.                  RealType *Dir,
  68.                  RealType *Index);
  69. IPObjectStruct *CurveFromSurface(IPObjectStruct *SrfObj,
  70.                  RealType *Dir,
  71.                  RealType *ParamVal);
  72. IPObjectStruct *CurveReverse(IPObjectStruct *CrvObj);
  73. IPObjectStruct *SurfaceReverse(IPObjectStruct *SrfObj);
  74. void ComputeSurfacePolygons(IPObjectStruct *PObj);
  75. IPObjectStruct *Geometry2Polygons(IPObjectStruct *Obj, RealType *Normals);
  76. IPObjectStruct *Geometry2Polylines(IPObjectStruct *Obj, RealType *Optimal);
  77. IPObjectStruct *ExtremumControlPointVals(IPObjectStruct *Obj, CagdRType *Min);
  78. IPObjectStruct *GenCircleCurveObject(VectorType Position, RealType *Radius);
  79. IPObjectStruct *GenPCircleCurveObject(VectorType Position, RealType *Radius);
  80. IPObjectStruct *GenArcCurveObject(VectorType Start,
  81.                   VectorType Center,
  82.                   VectorType End);
  83. IPObjectStruct *GenRuledSrfObject(IPObjectStruct *Crv1, IPObjectStruct *Crv2);
  84. IPObjectStruct *GenBoolSumSrfObject(IPObjectStruct *Crv1,
  85.                     IPObjectStruct *Crv2,
  86.                     IPObjectStruct *Crv3,
  87.                     IPObjectStruct *Crv4);
  88. IPObjectStruct *GenBoolOneSrfObject(IPObjectStruct *BndryCrv);
  89. IPObjectStruct *GenSrfFromCrvsObject(IPObjectStruct *CrvList,
  90.                      RealType *OtherOrder);
  91. IPObjectStruct *GenSweepScaleSrfObject(IPObjectStruct *CrossSection,
  92.                        IPObjectStruct *Axis,
  93.                        IPObjectStruct *Scale,
  94.                        IPObjectStruct *Frame,
  95.                        RealType *RRefine);
  96. IPObjectStruct *GenSweepSrfObject(IPObjectStruct *CrossSection,
  97.                   IPObjectStruct *Axis, 
  98.                   IPObjectStruct *Frame);
  99. IPObjectStruct *GenOffsetObject(IPObjectStruct *Obj,
  100.                 RealType *Offset,
  101.                 RealType *Tolerance,
  102.                 RealType *BezInterp);
  103. IPObjectStruct *GenAOffsetObject(IPObjectStruct *Obj,
  104.                  RealType *Offset,
  105.                  RealType *Epsilon,
  106.                  RealType *Trim,
  107.                  RealType *BezInterp);
  108. IPObjectStruct *GenLeastSqrOffsetObject(IPObjectStruct *Obj,
  109.                     RealType *Offset,
  110.                     RealType *NumOfSamples,
  111.                     RealType *NumOfDOF,
  112.                     RealType *Order);
  113. IPObjectStruct *MergeSrfSrf(IPObjectStruct *Srf1,
  114.                 IPObjectStruct *Srf2,
  115.                 RealType *Dir,
  116.                 RealType *SameEdge);
  117. IPObjectStruct *MergeCurvesAndCtlPoints(IPObjectStruct *PObj1,
  118.                     IPObjectStruct *PObj2);
  119. IPObjectStruct *EditCrvControlPoint(IPObjectStruct *PObjCrv,
  120.                     CagdCtlPtStruct *Pt,
  121.                     RealType *Index);
  122. IPObjectStruct *EditSrfControlPoint(IPObjectStruct *PObjSrf,
  123.                     CagdCtlPtStruct *Pt,
  124.                     RealType *UIndex,
  125.                     RealType *VIndex);
  126. IPObjectStruct *RaiseCurveObject(IPObjectStruct *PObjCrv, RealType *Order);
  127. IPObjectStruct *RaiseSurfaceObject(IPObjectStruct *PObjSrf,
  128.                    RealType *RDir,
  129.                    RealType *RNewOrder);
  130. void MakeFreeFormCompatible(IPObjectStruct *PObj1, IPObjectStruct *PObj2);
  131. IPObjectStruct *TwoCrvsMorphing(IPObjectStruct *PObjCrv1,
  132.                 IPObjectStruct *PObjCrv2,
  133.                 RealType *Method,
  134.                 RealType *Blend);
  135. IPObjectStruct *TwoSrfsMorphing(IPObjectStruct *PObjSrf1,
  136.                 IPObjectStruct *PObjSrf2,
  137.                 RealType *Blend);
  138. IPObjectStruct *CnvrtBezierToBspline(IPObjectStruct *PObj);
  139. IPObjectStruct *CnvrtBsplineToBezier(IPObjectStruct *PObj);
  140. IPObjectStruct *TwoCrvsSrfsProduct(IPObjectStruct *PObj1,
  141.                    IPObjectStruct *PObj2);
  142. IPObjectStruct *TwoCrvsSrfsDotProduct(IPObjectStruct *PObj1,
  143.                       IPObjectStruct *PObj2);
  144. IPObjectStruct *TwoCrvsSrfsCrossProduct(IPObjectStruct *PObj1,
  145.                     IPObjectStruct *PObj2);
  146. IPObjectStruct *TwoCrvsSrfsSum(IPObjectStruct *PObj1, IPObjectStruct *PObj2);
  147. IPObjectStruct *TwoCrvsSrfsDiff(IPObjectStruct *PObj1, IPObjectStruct *PObj2);
  148. IPObjectStruct *CrvReparametrization(IPObjectStruct *Obj,
  149.                      RealType *TMin,
  150.                      RealType *TMax);
  151. IPObjectStruct *SrfReparametrization(IPObjectStruct *Obj,
  152.                      RealType *RDir,
  153.                      RealType *TMin,
  154.                      RealType *TMax);
  155. IPObjectStruct *CrvCurvaturePts(IPObjectStruct *PObj, RealType *Eps);
  156. IPObjectStruct *SrfCurvatureBounds(IPObjectStruct *PObj,
  157.                    RealType *RPtType,
  158.                    RealType *RDir);
  159. IPObjectStruct *CrvEvolute(IPObjectStruct *PObj);
  160. IPObjectStruct *CrvInflectionPts(IPObjectStruct *PObj, RealType *Eps);
  161. IPObjectStruct *CrvZeros(IPObjectStruct *PObj, RealType *Eps, RealType *Axis);
  162. IPObjectStruct *CrvExtremes(IPObjectStruct *PObj,
  163.                 RealType *Eps,
  164.                 RealType *Axis);
  165. IPObjectStruct *CrvCrvInter(IPObjectStruct *PObj1,
  166.                 IPObjectStruct *PObj2,
  167.                 RealType *Eps,
  168.                 RealType *SelfInter);
  169. IPObjectStruct *CrvPointDist(IPObjectStruct *PCrv,
  170.                  PointType Point,
  171.                  RealType *MinDist,
  172.                  RealType *Eps);
  173. IPObjectStruct *CrvLineDist(IPObjectStruct *PCrv,
  174.                 PointType Point,
  175.                 VectorType Vec,
  176.                 RealType *MinDist,
  177.                 RealType *Eps);
  178. IPObjectStruct *CrvComposition(IPObjectStruct *PObj1, IPObjectStruct *PObj2);
  179. IPObjectStruct *SrfsPrisa(IPObjectStruct *Srfs,
  180.               CagdRType *SamplesPerCurve,
  181.               CagdRType *Epsilon,
  182.               CagdRType *Dir,
  183.               CagdVType Space);
  184. IPObjectStruct *SrfAdapIsoCurves(IPObjectStruct *Srf,
  185.                  CagdRType *Dir,
  186.                  CagdRType *Eps,
  187.                  CagdRType *FullIso,
  188.                  CagdRType *SinglePath);
  189. IPObjectStruct *GetFreefromParamDomain(IPObjectStruct *FreeformObj);
  190. IPObjectStruct *CrvLeastSquarePtData(IPObjectStruct *PtObjList,
  191.                      CagdRType *Order,
  192.                      CagdRType *CrvSize,
  193.                      CagdRType *ParamType);
  194. IPObjectStruct *SrfLeastSquarePtData(IPObjectStruct *LstObjList,
  195.                      CagdRType *UOrder,
  196.                      CagdRType *VOrder,
  197.                      CagdRType *USize,
  198.                      CagdRType *VSize,
  199.                      CagdRType *ParamType);
  200. int GetResolution(int ClipToMin);
  201. IPObjectStruct *CurveMultiResDecomp(IPObjectStruct *CrvObj, RealType *Discont);
  202. IPObjectStruct *GenTrimmedSurface(IPObjectStruct *SrfObj,
  203.                   IPObjectStruct *TrimmedCrvsObj,
  204.                   RealType *RHasTopLvlTrim);
  205. IPObjectStruct *GetSrfFromTrimmedSrf(IPObjectStruct *TrimmedSrfObj);
  206. IPObjectStruct *GetTrimCrvsFromTrimmedSrf(IPObjectStruct *TrimmedSrfObj,
  207.                       RealType *RParamSpace);
  208. IPObjectStruct *GenBezierTrivarObject(IPObjectStruct *LstLstObjList);
  209. IPObjectStruct *GenBsplineTrivarObject(RealType *RUOrder,
  210.                        RealType *RVOrder,
  211.                        RealType *RWOrder,
  212.                        IPObjectStruct *LstLstObjList,
  213.                        IPObjectStruct *KntObjList);
  214. IPObjectStruct *EvalTrivarObject(IPObjectStruct *TVObj,
  215.                  RealType *u,
  216.                  RealType *v,
  217.                  RealType *w);
  218. IPObjectStruct *SurfaceFromTrivar(IPObjectStruct *TVObj,
  219.                   RealType *RDir,
  220.                   RealType *ParamVal);
  221. IPObjectStruct *DivideTrivarObject(IPObjectStruct *TVObj,
  222.                     RealType *RDir,
  223.                     RealType *ParamVal);
  224. IPObjectStruct *RegionFromTrivarObject(IPObjectStruct *TVObj, 
  225.                     RealType *RDir,
  226.                     RealType *ParamVal1,
  227.                     RealType *ParamVal2);
  228. IPObjectStruct *RefineTrivarObject(IPObjectStruct *TVObj,
  229.                     RealType *RDir,
  230.                     RealType *RReplace,
  231.                     IPObjectStruct *KnotsObj);
  232. IPObjectStruct *DeriveTrivarObject(IPObjectStruct *TVObj, RealType *Dir);
  233. IPObjectStruct *InterpolateTrivar(IPObjectStruct *TVObj);
  234. IPObjectStruct *ComputeCrvMoments(IPObjectStruct *CrvObj, RealType *RMoment);
  235. IPObjectStruct *GenTVFromSrfsObject(IPObjectStruct *SrfList,
  236.                     RealType *OtherOrder);
  237.  
  238. #endif /* FREEFORM_H */
  239.